<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>beagleoncreate: Camera Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">beagleoncreate
   
   </div>
   <div id="projectbrief">Beagleboard sensor interface on iRobot Create with sonar and USB webcam through WiFi</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('class_camera.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a>  </div>
  <div class="headertitle">
<div class="title">Camera Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<!-- doxytag: class="Camera" -->
<p>The class that does everything related to the vision sensor. Using gstreamer in this class.  
 <a href="class_camera.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_camera_8h_source.html">Camera.h</a>&gt;</code></p>

<p><a href="class_camera-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_camera.html#aa017d8f16d7a14a70ad476e295db80be">Camera</a> (int remoteSock, struct sockaddr_in &amp;videoPort, struct sockaddr_in &amp;artagPort)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">A constructor for <a class="el" href="class_camera.html" title="The class that does everything related to the vision sensor. Using gstreamer in this class...">Camera</a> class. Init _sock, _videoPort, and _artagPort. Also call the constructor of <a class="el" href="class_a_rtag_localizer.html" title="This class is the core class that localize the ARtag using ARToolKitPlus.">ARtagLocalizer</a>.  <a href="#aa017d8f16d7a14a70ad476e295db80be"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad1897942d0ccf91052386388a497349f"></a><!-- doxytag: member="Camera::~Camera" ref="ad1897942d0ccf91052386388a497349f" args="()" -->
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_camera.html#ad1897942d0ccf91052386388a497349f">~Camera</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">A destructor for <a class="el" href="class_camera.html" title="The class that does everything related to the vision sensor. Using gstreamer in this class...">Camera</a> class. It calls the destructor of <a class="el" href="class_a_rtag_localizer.html" title="This class is the core class that localize the ARtag using ARToolKitPlus.">ARtagLocalizer</a> and deletes it. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_camera.html#ab910352077a06c77263730503194d343">StreamARtagVideo</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The main loop for <a class="el" href="class_camera.html" title="The class that does everything related to the vision sensor. Using gstreamer in this class...">Camera</a> class. Also calls CleanUp when out of the loop.  <a href="#ab910352077a06c77263730503194d343"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a75a98be31f636a8617f96a8df74b0b69"></a><!-- doxytag: member="Camera::QuitMainLoop" ref="a75a98be31f636a8617f96a8df74b0b69" args="()" -->
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_camera.html#a75a98be31f636a8617f96a8df74b0b69">QuitMainLoop</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">A public function to quit the <a class="el" href="class_camera.html" title="The class that does everything related to the vision sensor. Using gstreamer in this class...">Camera</a> class main loop. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_camera.html#aeee2a236b8d1aa06d69504a979388c93">SendImage</a> (IplImage *image)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Send the image object over through udp.  <a href="#aeee2a236b8d1aa06d69504a979388c93"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_camera.html#ad0aa22376d9712456f4b818269e13c87">SendARtag</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Send the <a class="el" href="class_a_rtag.html" title="ARtag class which holds information like tag ID and pose matrix for the ARtag.">ARtag</a> id and pose info over to remote through udp.  <a href="#ad0aa22376d9712456f4b818269e13c87"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2c93ee7ba0911eae4b0b8a56c9235fba"></a><!-- doxytag: member="Camera::SetVideoBroadcast" ref="a2c93ee7ba0911eae4b0b8a56c9235fba" args="(bool isBroadcast)" -->
void&#160;</td><td class="memItemRight" valign="bottom"><b>SetVideoBroadcast</b> (bool <a class="el" href="class_camera.html#adbda12e714701f9711e1d0159202c28d">isBroadcast</a>)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_camera.html#adbda12e714701f9711e1d0159202c28d">isBroadcast</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">A getter for the private variable _isBroadcast to broadcast video to MATLAB.  <a href="#adbda12e714701f9711e1d0159202c28d"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">GMainLoop *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_camera.html#aa9f53c5a4006bb5c997c8c2c3022eefa">loop</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">GstElement *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_camera.html#a66acfbb9697d24dfb0a041f34b2e9476">pipeline1</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">GstElement *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_camera.html#a06b3425d8f4d6bf19619a46f13621e4c">pipeline2</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">IplImage *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_camera.html#a40b1637df19f2c1989c510cb7d740182">img</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">IplImage *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_camera.html#a8649f855240bf694c3c8d6d15703d012">gray</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uchar *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_camera.html#a98302d2133e7a75c26e2b1580a3e52f9">IMG_data</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_a_rtag_localizer.html">ARtagLocalizer</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_camera.html#ae45cdadaa176b1243db69fc1c026f0bf">ar</a></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>The class that does everything related to the vision sensor. Using gstreamer in this class. </p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="aa017d8f16d7a14a70ad476e295db80be"></a><!-- doxytag: member="Camera::Camera" ref="aa017d8f16d7a14a70ad476e295db80be" args="(int remoteSock, struct sockaddr_in &amp;videoPort, struct sockaddr_in &amp;artagPort)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_camera.html#aa017d8f16d7a14a70ad476e295db80be">Camera::Camera</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>remoteSock</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct sockaddr_in &amp;&#160;</td>
          <td class="paramname"><em>videoPort</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct sockaddr_in &amp;&#160;</td>
          <td class="paramname"><em>artagPort</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>A constructor for <a class="el" href="class_camera.html" title="The class that does everything related to the vision sensor. Using gstreamer in this class...">Camera</a> class. Init _sock, _videoPort, and _artagPort. Also call the constructor of <a class="el" href="class_a_rtag_localizer.html" title="This class is the core class that localize the ARtag using ARToolKitPlus.">ARtagLocalizer</a>. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">remoteSock</td><td>the socket that was initalized and ready to send to remote. </td></tr>
    <tr><td class="paramname">videoPort</td><td>the udp port for sending over image stream. </td></tr>
    <tr><td class="paramname">artagPort</td><td>the udp port for sending detected <a class="el" href="class_a_rtag.html" title="ARtag class which holds information like tag ID and pose matrix for the ARtag.">ARtag</a> id and pose information. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="adbda12e714701f9711e1d0159202c28d"></a><!-- doxytag: member="Camera::isBroadcast" ref="adbda12e714701f9711e1d0159202c28d" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="class_camera.html#adbda12e714701f9711e1d0159202c28d">Camera::isBroadcast</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>A getter for the private variable _isBroadcast to broadcast video to MATLAB. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>_isBroadcast </dd></dl>

</div>
</div>
<a class="anchor" id="ad0aa22376d9712456f4b818269e13c87"></a><!-- doxytag: member="Camera::SendARtag" ref="ad0aa22376d9712456f4b818269e13c87" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_camera.html#ad0aa22376d9712456f4b818269e13c87">Camera::SendARtag</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Send the <a class="el" href="class_a_rtag.html" title="ARtag class which holds information like tag ID and pose matrix for the ARtag.">ARtag</a> id and pose info over to remote through udp. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_a_rtag.html" title="ARtag class which holds information like tag ID and pose matrix for the ARtag.">ARtag</a> </dd></dl>

</div>
</div>
<a class="anchor" id="aeee2a236b8d1aa06d69504a979388c93"></a><!-- doxytag: member="Camera::SendImage" ref="aeee2a236b8d1aa06d69504a979388c93" args="(IplImage *image)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_camera.html#aeee2a236b8d1aa06d69504a979388c93">Camera::SendImage</a> </td>
          <td>(</td>
          <td class="paramtype">IplImage *&#160;</td>
          <td class="paramname"><em>image</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Send the image object over through udp. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">image</td><td>the image to be sent over. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ab910352077a06c77263730503194d343"></a><!-- doxytag: member="Camera::StreamARtagVideo" ref="ab910352077a06c77263730503194d343" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="class_camera.html#ab910352077a06c77263730503194d343">Camera::StreamARtagVideo</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The main loop for <a class="el" href="class_camera.html" title="The class that does everything related to the vision sensor. Using gstreamer in this class...">Camera</a> class. Also calls CleanUp when out of the loop. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 on success, -1 on fail. </dd></dl>

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="ae45cdadaa176b1243db69fc1c026f0bf"></a><!-- doxytag: member="Camera::ar" ref="ae45cdadaa176b1243db69fc1c026f0bf" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_a_rtag_localizer.html">ARtagLocalizer</a>* <a class="el" href="class_camera.html#ae45cdadaa176b1243db69fc1c026f0bf">Camera::ar</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The artag localizer object. </p>

</div>
</div>
<a class="anchor" id="a8649f855240bf694c3c8d6d15703d012"></a><!-- doxytag: member="Camera::gray" ref="a8649f855240bf694c3c8d6d15703d012" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">IplImage* <a class="el" href="class_camera.html#a8649f855240bf694c3c8d6d15703d012">Camera::gray</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The gray image variable to be used for the buffer. </p>

</div>
</div>
<a class="anchor" id="a40b1637df19f2c1989c510cb7d740182"></a><!-- doxytag: member="Camera::img" ref="a40b1637df19f2c1989c510cb7d740182" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">IplImage* <a class="el" href="class_camera.html#a40b1637df19f2c1989c510cb7d740182">Camera::img</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The image variable to be used for the buffer. </p>

</div>
</div>
<a class="anchor" id="a98302d2133e7a75c26e2b1580a3e52f9"></a><!-- doxytag: member="Camera::IMG_data" ref="a98302d2133e7a75c26e2b1580a3e52f9" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uchar* <a class="el" href="class_camera.html#a98302d2133e7a75c26e2b1580a3e52f9">Camera::IMG_data</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The raw data from the image buffer. </p>

</div>
</div>
<a class="anchor" id="aa9f53c5a4006bb5c997c8c2c3022eefa"></a><!-- doxytag: member="Camera::loop" ref="aa9f53c5a4006bb5c997c8c2c3022eefa" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GMainLoop* <a class="el" href="class_camera.html#aa9f53c5a4006bb5c997c8c2c3022eefa">Camera::loop</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The main loop of gstreamer. </p>

</div>
</div>
<a class="anchor" id="a66acfbb9697d24dfb0a041f34b2e9476"></a><!-- doxytag: member="Camera::pipeline1" ref="a66acfbb9697d24dfb0a041f34b2e9476" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GstElement* <a class="el" href="class_camera.html#a66acfbb9697d24dfb0a041f34b2e9476">Camera::pipeline1</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Pipeline 1 for gstreamer. </p>

</div>
</div>
<a class="anchor" id="a06b3425d8f4d6bf19619a46f13621e4c"></a><!-- doxytag: member="Camera::pipeline2" ref="a06b3425d8f4d6bf19619a46f13621e4c" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GstElement* <a class="el" href="class_camera.html#a06b3425d8f4d6bf19619a46f13621e4c">Camera::pipeline2</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Pipeline 2 for gstreamer. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>D:/backups/Desktop/beagleoncreate/trunk/camera/<a class="el" href="_camera_8h_source.html">Camera.h</a></li>
<li>D:/backups/Desktop/beagleoncreate/trunk/camera/<a class="el" href="_camera_8cpp.html">Camera.cpp</a></li>
</ul>
</div><!-- contents -->
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="class_camera.html">Camera</a>      </li>

    <li class="footer">Generated on Sun Feb 12 2012 18:23:34 for beagleoncreate by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.6.1 </li>
   </ul>
 </div>


</body>
</html>
